package com.gan.simple_init.controller.sys;

import com.gan.simple_init.common.base.ResponseResult;
import com.gan.simple_init.common.base.RestResultGenerator;
import com.gan.simple_init.service.SysMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author gbw
 * @date 2023/8/17
 */
@RestController
@RequestMapping("/menu")
public class SysMenuController {

    @Resource
    SysMenuService sysMenuService;

    @GetMapping("/getMenuList")
    public ResponseResult<?> getMenuListByUserId(){
        return RestResultGenerator.success(sysMenuService.selectMenuByUserId());
    }

}
